
package com.jf.cloud.multishop.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 公告DTO
 *
 * @author zz
 * @date 2020-11-25 17:57:56
 */
public class NoticeDTO{
    private static final long serialVersionUID = 1L;

    @Schema(description = "公告id" )
    private Long id;

    @Schema(description = "店铺id" )
    private Long shopId;

    @NotNull(message = "标题不能为空")
    @Schema(description = "公告标题" )
    private String title;

    @NotNull(message = "内容不能为空")
    @Schema(description = "公告内容" )
    private String content;

//    @NotNull(message = "是否立即发送 1：立即发送    0：定时发送")
    @Schema(description = "是否立即发送 1：立即发送    0：定时发送" )
    private Integer immediatelySend;

//    @Schema(description = "发送时间" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;

    @Schema(description = "类型(1:在商家端展示 2:在用户端展示 3：在供应商端展示)" )
    private Integer type;

//    @NotNull(message = "类型不能为空")
    @Schema(description = "类型不能为空（平台端同时创建多类型公告,用逗号隔开）(1:在商家端展示 2:在用户端展示 3：在供应商端展示)" )
    private String types;

    @Schema(description = "商家可见范围 (为空则全部可见)" )
    private String multiShopIds;

    @Schema(description = "用户可见范围 (为空则全部可见)" )
    private String userIds;

    @Schema(description = "供应商可见范围 (为空则全部可见)" )
    private String supplierIds;

    @Schema(description = "当前账号id(商家：租户id   用户：userId)" )
    private Long accountId;

    @NotNull(message = "状态不能为空")
    @Schema(description = "状态(1:公布 0:撤回)" )
    private Integer status;

    @NotNull(message = "是否置顶不能为空")
    @Schema(description = "是否置顶" )
    private Integer isTop;

    @Schema(description = "发布时间" )
    private Date publishTime;

    @Schema(description = "是否已读(1:已读 0:未读)" )
    private Integer isLearning;

    @Schema(description = "发布开始日期" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @Schema(description = "发布结束日期" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getIsLearning() {
        return isLearning;
    }

    public void setIsLearning(Integer isLearning) {
        this.isLearning = isLearning;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTypes() {
        return types;
    }

    public void setTypes(String types) {
        this.types = types;
    }



    public void setUserIds(String userIds) {
        this.userIds = userIds;
    }

    public void setSupplierIds(String supplierIds) {
        this.supplierIds = supplierIds;
    }


    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getIsTop() {
        return isTop;
    }

    public void setIsTop(Integer isTop) {
        this.isTop = isTop;
    }

    public Date getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public Integer getImmediatelySend() {
        return immediatelySend;
    }

    public void setImmediatelySend(Integer immediatelySend) {
        this.immediatelySend = immediatelySend;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public String getMultiShopIds() {
        return multiShopIds;
    }

    public void setMultiShopIds(String multiShopIds) {
        this.multiShopIds = multiShopIds;
    }

    public String getUserIds() {
        return userIds;
    }

    public String getSupplierIds() {
        return supplierIds;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "NoticeDTO{" +
                "id=" + id +
                ", shopId=" + shopId +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", immediatelySend=" + immediatelySend +
                ", sendTime=" + sendTime +
                ", types='" + types + '\'' +
                ", multiShopIds='" + multiShopIds + '\'' +
                ", userIds='" + userIds + '\'' +
                ", supplierIds='" + supplierIds + '\'' +
                ", accountId=" + accountId +
                ", status=" + status +
                ", isTop=" + isTop +
                ", publishTime=" + publishTime +
                ", isLearning=" + isLearning +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                '}';
    }
}
